package com.gdssoft.pdaweb.dao.deviceReg.impl;

import java.util.List;

import com.gdssoft.core.dao.impl.BaseDaoImpl;
import com.gdssoft.pdaweb.dao.deviceReg.DeviceRegDao;
import com.gdssoft.pdaweb.model.deviceReg.DeviceReg;


public class DeviceRegDaoImpl extends BaseDaoImpl<DeviceReg> implements DeviceRegDao{
	public DeviceRegDaoImpl() {
		super(DeviceReg.class);
	}
	public DeviceReg getByMac(String mac) {
		String hql = "from DeviceReg where mac=?";
		return (DeviceReg) this.findUnique(hql, new String[]{mac});
		
		/*
		try{
			int count = jdbcTemplate.queryForInt(sql);

            	return count;
			
		}catch(Exception e){
			logger.debug("mac check query error:"+e.getMessage());			
		}
		
		return 0;
		*/
	}
}
